Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add env values for local run to allow moving away from Rails.secrets #799

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

syed-ali-tw
Copy link
Contributor

Rails.application.secrets is deprecated in favor of Rails.application.credentials and and will be removed in Rails 7.2.

This generates alot of warning noise with test runs.

We dont necessarily need Rails.application.credentials and we can just replace the values to be read from environment variables.

@AgaDufrat
Copy link
Contributor

AgaDufrat commented Dec 11, 2024

@syed-ali-tw Do you still want to merge this? Personally I think this PR should be closed and the relevant changes made in the Publisher repo.

You don’t need to set the SECRET_KEY_BASE. In development and test the value is randomly generated and stored in a temporary file in tmp/local_secret.txt. 1
The ENV SECRET_KEY_BASE_DUMMY=1 is set in
https://github.com/alphagov/govuk-ruby-images/blob/main/builder.Dockerfile#L16

Footnotes

  1. https://github.com/rails/rails/blob/v7.2.1/railties/lib/rails/application.rb#L453-L471

@AgaDufrat
Copy link
Contributor

@syed-ali-tw Can we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants